function Mamifero(name){
    this.name = name;
    this.set=[];
}

Mamifero.prototype.parir = function(){
    var newMamifero = new this.constructor('Bebe '+this.name);
    this.set.push(newMamifero);
    return newMamifero;
}
Mamifero.prototype.toString = function(){
    return this.name+" y poseo "+this.set.length+' crias';
}


Gato.prototype = new Mamifero();
Gato.prototype.constructor = Gato;

function Gato(name){
    this.name = name;
}

Gato.prototype.toString=function(){ 
	return '[Gato "'+this.name+'"]';
} 
Gato.prototype.parir=function(){ 
	this.parent.parir.call(this);
	console.log("mew!");
}
